package com.zhaowb.springcloud.admin.mapper;

import com.zhaowb.springcloud.admin.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * Created with IDEA
 *
 * @author zhaowb
 * @date 2018/11/1 10:17
 */
@Repository
public interface UserMapper extends Mapper<User> {
    /**
     * 根据分组id（groupId）获取群组关联用户
     *
     * @param groupId 分组id
     * @return
     */
    List<User> selectMemberByGroupId(@Param("groupId") int groupId);

    /**
     * 获取群组关联用户
     *
     * @param groupId 分组id
     * @return
     */
    List<User> selectLeaderByGroupId(@Param("groupId") int groupId);
}